package com.training.iyogo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.training.iyogo.dao.ICoachDAO;
import com.training.iyogo.domain.Coach;
import com.training.iyogo.service.ICoachService;
@Service
public class CoachService implements ICoachService{

	@Autowired
	private ICoachDAO coachDao;
	
	@Override
	public void addCoach(Coach coach) {
		coachDao.save(coach);
		
	}

	@Override
	public Coach getByName(String name) {
		return coachDao.findByName(name);
	}

}
